<template>
  <div class="details">
    <div class="d1" @click="Mydetails">
      <div class="fanhui"></div>
      <img src="../../assets/image/harvard_2.png" alt="" class="bc" />
      <img src="../../assets/image/teacher.png" alt="" class="teacher" />
    </div>
    <div class="d2">
      <span class="yixiake">已下课</span>
      <p class="animals">African Safari Animals</p>
      <van-collapse v-model="activeNames">
        <van-collapse-item title="奇妙的草原动物" name="3" class="qimiao"
          >内容</van-collapse-item
        >
      </van-collapse>
      <p class="time">上课时间: 今天19:30</p>
      <button>去上课</button>
    </div>
    <div class="d3">
      <div class="keqian">
        <p>课前预习</p>
        <ul>
          <li class="l1">
            <img
              src="../../assets/image/icon/class_idea.png"
              alt=""
              class="i1"
            />
            <span>知识点</span>
            <img src="../../assets/image/icon/icon_3.png" alt="" class="i2" />
          </li>
          <li class="l2">
            <img
              src="../../assets/image/icon/class_video.png"
              alt=""
              class="i3"
            />
            <span>看绘本</span>
            <img src="../../assets/image/icon/icon_3.png" alt="" class="i4" />
          </li>
        </ul>
      </div>
      <div class="kehou">
        <p>课后作业</p>
        <ul>
          <li class="l3">
            <img
              src="../../assets/image/icon/class_back.png"
              alt=""
              class="i5"
            />
            <span>选一选</span>
            <img src="../../assets/image/icon/icon_3.png" alt="" class="i6" />
          </li>
          <li class="l4">
            <img
              src="../../assets/image/icon/class_wifi.png"
              alt=""
              class="i7"
            />
            <span>读单词</span>
            <img src="../../assets/image/icon/icon_3.png" alt="" class="i8" />
          </li>
        </ul>
      </div>
    </div>
    <div class="d4">
      <p>课后报告</p>
      <div class="d5">
        <span>分享课后报告</span>
        <button>分享</button>
      </div>
    </div>
  </div>
</template>

<script>
import { Collapse, CollapseItem } from "vant";
import { ref } from "vue";

export default {
  setup() {
    const activeNames = ref(["1"]);
    return { activeNames };
  },
  components: {
    "van-collapse": Collapse,
    "van-collapse-item": CollapseItem,
  },
  methods: {
    Mydetails() {
      this.$router.go(-1);
    },
  },
};
</script>

<style lang="less" scoped>
.d1 {
  width: 100%;
  position: relative;
  .fanhui {
    position: absolute;
    width: 30px;
    height: 30px;
    background-color: tomato;
    z-index: 999;
    top: 50px;
    left: 10px;
    opacity: 0;
  }
  .bc {
    width: 100%;
    position: absolute;
  }
  .teacher {
    top: 160px;
    left: 270px;
    width: 60px;
    position: absolute;
    z-index: 999;
  }
}
.d2 {
  height: 240px;
  position: absolute;
  top: 195px;
  background-color: white;
  width: 340px;
  margin-left: 17.5px;
  border-radius: 20px;
  .yixiake {
    display: flex;
    width: 60px;
    height: 20px;
    font-size: 12px;
    background-color: #eeeeee;
    color: #8b8b8b;
    justify-content: center;
    align-items: center;
    margin-top: 18px;
    margin-left: 15px;
    border-radius: 10px;
  }
  .animals {
    font-weight: 600;
    color: black;
    margin-top: 10px;
    margin-left: 10px;
  }
  .time {
    font-size: 16px;
    color: black;
    font-weight: 400;
    margin-left: 10px;
    margin-top: 15px;
  }
  button {
    width: 310px;
    height: 50px;
    background-color: #00a0ff;
    border: none;
    color: white;
    font-size: 16px;
    border-radius: 30px;
    margin-left: 15px;
    margin-top: 20px;
  }
}
.d3 {
  position: absolute;
  width: 340px;
  height: 420px;
  background-color: white;
  margin-top: 450px;
  margin-left: 17.5px;
  border-radius: 20px;
  .keqian p {
    font-size: 16px;
    font-weight: 600px;
    margin-top: 20px;
    margin-left: 15px;
  }
  .kehou p {
    font-size: 16px;
    font-weight: 600px;
    margin-top: 20px;
    margin-left: 15px;
  }
  li {
    width: 290px;
    height: 60px;
    background-color: #f5f5f5;
    border-radius: 20px;
    margin-left: 25px;
  }
  .l1 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 20px;
    .i1 {
      width: 50px;
    }
    .i2 {
      width: 8px;
    }
    span {
      font-size: 16px;
      font-weight: 600;
      margin-right: 120px;
    }
  }
  .l2 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    .i3 {
      width: 50px;
    }
    .i4 {
      width: 8px;
    }
    span {
      font-size: 16px;
      font-weight: 600;
      margin-right: 120px;
    }
  }
  .l3 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin-bottom: 10px;
    margin-top: 20px;
    .i5 {
      width: 50px;
    }
    .i6 {
      width: 8px;
    }
    span {
      font-size: 16px;
      font-weight: 600;
      margin-right: 120px;
    }
  }
  .l4 {
    display: flex;
    justify-content: space-around;
    align-items: center;
    .i7 {
      width: 50px;
    }
    .i8 {
      width: 8px;
    }
    span {
      font-size: 16px;
      font-weight: 600;
      margin-right: 120px;
    }
  }
}
.d4 {
  position: absolute;
  margin-top: 900px;
  background-color: white;
  border-radius: 20px;
  width: 340px;
  margin-left: 17.5px;
  height: 120px;
  p {
    font-size: 16px;
    font-weight: 600;
    margin-top: 30px;
    margin-left: 20px;
  }
  .d5 {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    span {
      font-size: 16px;
      margin-left: 20px;
    }
    button {
      width: 80px;
      font-size: 16px;
      margin-right: 20px;
      height: 35px;
      border-radius: 20px;
      color: white;
      border: none;
      background-color: #dfdfdf;
    }
  }
}
</style>
